#include<bits/stdc++.h>
using namespace std;
long long n,a[100010],x,y=0,sum,j;
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    sum=n;
    for(int i=1;i<=n;i++)
    {
        cin>>a[i];
    }
    for(int i=1;i<n;i++)
    {
        for(int j=i+1;j<=n;j++)
        {
            if(a[i]>a[j])
            {
                x=a[i];
                a[i]=a[j];
                a[j]=x;
            }
        }
    }
    for(int i=1;i<=n/2;i++)
    {
        j=i+n/2;
        if(a[i]<a[j])
        {
            sum--;
        }
    }
    if(n%2==1) cout<<sum-1;
    else cout<<sum;
}
